package com.scqzy.shengchunqiang.sword2offer.day08;

/**
 * @Description: 剑指 Offer 10- II. 青蛙跳台阶问题
 * @Author 盛春强
 * @Date 2021/8/15 15:46
 */
public class NumWays {
    public int numWays(int n) {
        int a = 1;
        int b = 1;
        for (int i = 2; i <= n; i++) {
            int tmp = a;
            a = b;
            b = (tmp + a) % 1000000007;
        }
        return b;
    }
}
